const _ = require('lodash')
const { readJSONFileSync, existsJSONSync } = require('./src/core/utils')
const { USER_SETTINGS_FILE_PATH } = require('./src/core/variable')

// 读取用户配置
const USER_SETTINGS = !existsJSONSync(USER_SETTINGS_FILE_PATH, true)
  ? {}
  : readJSONFileSync(USER_SETTINGS_FILE_PATH)

// 合并配置
module.exports = _.merge(
  // 用户配置
  USER_SETTINGS
)
